using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._DataManagement._Generalization
{
    /// <summary>
    /// <para>Identify Narrow Polygons</para>
    /// <para>Splits a polygon based on its width and classifies each portion as narrow or wide based on its width and length.</para>
    /// <para>根据多边形的宽度拆分多边形，并根据其宽度和长度将每个部分分类为窄部分或宽部分。</para>
    /// </summary>    
    [DisplayName("Identify Narrow Polygons")]
    public class IdentifyNarrowPolygons : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public IdentifyNarrowPolygons()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The features to be split.</para>
        /// <para>要拆分的功能。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing the results.</para>
        /// <para>包含结果的输出要素类。</para>
        /// </param>
        /// <param name="_min_width">
        /// <para>Minimum Width</para>
        /// <para>The width used to split and classify polygons as narrow or wide. Polygons will be split at any location where the edge-to-edge distance is equal to the Minimum Width.</para>
        /// <para>用于分割和分类多边形为窄或宽的宽度。多边形将在边到边距离等于最小宽度的任何位置进行分割。</para>
        /// </param>
        /// <param name="_min_length">
        /// <para>Minimum Length</para>
        /// <para>The length used to classify the split polygons as short or long.</para>
        /// <para>用于将分割面分类为短多边形或长多边形的长度。</para>
        /// </param>
        public IdentifyNarrowPolygons(object _in_features, object _out_feature_class, string? _min_width, string? _min_length)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
            this._min_width = _min_width;
            this._min_length = _min_length;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Identify Narrow Polygons";

        public override string CallName => "topographic.IdentifyNarrowPolygons";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _min_width, _min_length, _taper_length, _connecting_features];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The features to be split.</para>
        /// <para>要拆分的功能。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing the results.</para>
        /// <para>包含结果的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Minimum Width</para>
        /// <para>The width used to split and classify polygons as narrow or wide. Polygons will be split at any location where the edge-to-edge distance is equal to the Minimum Width.</para>
        /// <para>用于分割和分类多边形为窄或宽的宽度。多边形将在边到边距离等于最小宽度的任何位置进行分割。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Width")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _min_width { get; set; }


        /// <summary>
        /// <para>Minimum Length</para>
        /// <para>The length used to classify the split polygons as short or long.</para>
        /// <para>用于将分割面分类为短多边形或长多边形的长度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Length")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _min_length { get; set; }


        /// <summary>
        /// <para>Taper Length</para>
        /// <para>The distance the end of the split feature will extend to provide a more natural break.</para>
        /// <para>分割要素末端的距离将延长，以提供更自然的断裂。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Taper Length")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _taper_length { get; set; } = null;


        /// <summary>
        /// <para>Connecting Features</para>
        /// <para>The features that will be used to refine the tapering of wide areas. The polygons will be tapered toward the touch point or the shared boundary of a connecting feature.</para>
        /// <para>将用于优化大面积锥度的特征。面将朝向连接要素的接触点或共享边界逐渐变细。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Connecting Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _connecting_features { get; set; } = null;


        public IdentifyNarrowPolygons SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}